CC=gcc
prefix=/usr
CCC=/opt/crosstool-ng/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc

all:

x86:
	$(CC) -Wall src/functions.c src/main.c -lpcap -o bin/x86-64/wurmd
x86-debug:
	$(CC) -g -Wall src/functions.c src/main.c -lpcap -o bin/x86-64/wurmd-debug
arm:
	$(CCC) src/functions.c src/main.c -L/opt/crosstool-ng/x-tools/arm-unknown-linux-gnueabi/lib/ -I/opt/crosstool-ng/x-tools/arm-unknown-linux-gnueabi/include/ -Wall -static -lpcap -o bin/arm/wurmd

install:
	install -m 0755 bin/x86-64/wurmd $(prefix)/sbin/
	install -m 0755 debian/etc/wurmd.conf /etc/
	install -m 0755 debian/etc/default/wurmd /etc/default/
	install -m 0755 debian/etc/init.d/wurmd /etc/init.d/
